﻿
<!DOCTYPE html>
<html lang="en">

<head>
    <title>属性</title>
    <meta charset="utf-8">
</head>

<body>
    <div id="box">
        <input id="num" name="num" type="number" size="3" value=0 disabled>
        <button id="jia">增加</button>
        <button id="jian">减少</button>

    </div>
    <script src="jquery.min.js"></script>
    <script>
        $(function () {
            $("#jia").click(function(){
                var h=Number($("#num").val())+1; 
                $("#num").val(h);
            });
            $("#jian").click(function(){
                var h=Number($("#num").val())-1; 
                $("#num").val(h);
            });
        });
    </script>
</body>

</html>